<?php
/**
 * Created by PhpStorm.
 * User: lzq
 * Date: 2017/3/18
 * Time: 10:57
 */
namespace Tools\Controller;
use Common\Controller\FrontbaseController;

class JobcontentController extends FrontbaseController{

    protected $jobcontent_model;

    public function _initialize(){
        parent::_initialize();
        $this->jobcontent_model=D("ToolsJobcontent");
    }

    public function add_post() {
        $post = I('post.');
        #实例化模型
        $model = M('ToolsJobcontent');
        #增加操作
        $rst = $model -> add($post);
        #判断返回结果
        if($rst!==false){
            $arr['status'] = '1';
            $arr['msg'] = '您已录入成功！';
            $this->output($arr);

        }else{
            $arr['status'] = '0';
            $arr['msg'] = '录入失败！';
            $this->output($arr);
        }
    }
}